﻿<Window x:Class="eipch.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="500" Width="700"
        Icon="/eipch;component/00%20-%20Source/connect_to_network.png" Closed="Window_Closed_1">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="22px"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        
        <DockPanel Grid.Row="0" Grid.Column="0">
            <Menu DockPanel.Dock="Top" Name="MainMenu" >
                <MenuItem Header="_Datei">
                    <MenuItem Header="_Speichern" Name="menu_Save" Click="menu_Save_Click">
                        <MenuItem.Icon>
                            <Image Source="/eipch;component/00%20-%20Source/FloppyDisk.png" Width="16px" Height="16px" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <Separator />
                    <MenuItem Header="_Beenden" Click="Exit_Click">
                        <MenuItem.Icon>
                            <Image Source="/eipch;component/00%20-%20Source/error.png" Width="16px" Height="16px" />
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>
                <MenuItem Header="_Netzwerk">
                    <MenuItem Header="_DHCP release" Name="menu_DHCPrelease" Click="menu_DHCPrelease_Click" />
                    <MenuItem Header="_DHCP renew" Name="menu_DHCPrenew" Click="menu_DHCPrenew_Click" />
                </MenuItem>
                <MenuItem Header="_Info" Click="Info_Click" />
            </Menu>
         </DockPanel>

        <TabControl  Grid.Row="1" Grid.Column="0" Name="tabControl" Margin="10, 25, 10, 10" VerticalAlignment="Stretch" TabStripPlacement="Left">
            <TabItem Header="Start" Name="start">
                
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    
                    <!-- 1 row -->
                    <Label Grid.Column="0" Grid.Row="0" Name="lbl_Adapter" Content="NIC"/>
                    <ComboBox Grid.Column="1" Grid.Row="0" Name="cbox_NICs" SelectionChanged="NIC_selection_Changed" />
                    <!-- 2 row -->
                    <Label Grid.Column="0" Grid.Row="1" Name="lbl_AdapterConfig" Content="alte Konfiguration"/>
                    <Grid Grid.Column="1" Grid.Row="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>

                        <!-- 0 row -->
                        <Label Grid.Column="0" Grid.Row="0" Name="lbl_currentMAC" Content="MAC" />
                        <Label Grid.Column="1" Grid.Row="0" Name="lbl_currentselectedMAC" Content="selected MAC" />
                        <!-- 1 row -->
                        <Label Grid.Column="0" Grid.Row="1" Name="lbl_currentDHCP" Content="DHCP" />
                        <CheckBox Grid.Column="1" Grid.Row="1" Name="ckbox_currentselectedDHCP" IsEnabled="False" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" />
                        <!-- 2 row -->
                        <Label Grid.Column="0" Grid.Row="2" Name="lbl_currentIP" Content="IP-Adresse" />
                        <Label Grid.Column="1" Grid.Row="2" Name="lbl_currentselectedIP" Content="selected IP-Adresse" />
                        <!-- 3 row -->
                        <Label Grid.Column="0" Grid.Row="3" Name="lbl_currentNM" Content="Netzmaske" />
                        <Label Grid.Column="1" Grid.Row="3" Name="lbl_currentselectedNM" Content="selected NM" />
                        <!-- 4 row -->
                        <Label Grid.Column="0" Grid.Row="4" Name="lbl_currentGW" Content="Gateway" />
                        <Label Grid.Column="1" Grid.Row="4" Name="lbl_currentselectedGW" Content="selected GW" />
                        <!-- 5 row -->
                        <Label Grid.Column="0" Grid.Row="5" Name="lbl_currentDNS" Content="DNS" />
                        <Label Grid.Column="1" Grid.Row="5" Name="lbl_currentselectedDNS" Content="selected DNS" />
                    </Grid>

                    <!-- 3 row -->
                    <Label Grid.Column="0" Grid.Row="2" Name="lbl_Template" Content="Template"/>
                    <ComboBox Grid.Column="1" Grid.Row="2" Name="cbox_Template" SelectionChanged="cbox_Template_SelectionChanged" />
                    <!-- 4 row -->
                    <Label Grid.Column="0" Grid.Row="3" Name="lbl_Settings" Content="neue Konfiguration"/>
                    <Grid Grid.Column="2" Grid.Row="3">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>

                        <!-- 0 row -->
                        <Label Grid.Column="0" Grid.Row="0" Name="lbl_DHCP" Content="DHCP" />
                        <CheckBox Grid.Column="1" Grid.Row="0" Name="ckbox_selectedDHCP" IsEnabled="False" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
                        <!-- 1 row -->
                        <Label Grid.Column="0" Grid.Row="1" Name="lbl_IP" Content="IP-Adresse" />
                        <Label Grid.Column="1" Grid.Row="1" Name="lbl_selectedIP" Content="selected IP-Adresse" />
                        <!-- 2 row -->
                        <Label Grid.Column="0" Grid.Row="2" Name="lbl_NM" Content="Netzmaske" />
                        <Label Grid.Column="1" Grid.Row="2" Name="lbl_selectedNM" Content="selected NM" />
                        <!-- 3 row -->
                        <Label Grid.Column="0" Grid.Row="3" Name="lbl_GW" Content="Gateway" />
                        <Label Grid.Column="1" Grid.Row="3" Name="lbl_selectedGW" Content="selected GW" />
                        <!-- 4 row -->
                        <Label Grid.Column="0" Grid.Row="4" Name="lbl_DNS" Content="DNS" />
                        <Label Grid.Column="1" Grid.Row="4" Name="lbl_selectedDNS" Content="selected DNS" />
                    </Grid>
                    
                    <!-- 5 row -->
                    <Button Width="100px" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" Name="btn_activateSettings" Content="aktivieren" Click="btn_activateSettings_Click" />
                </Grid>
                
            </TabItem>
            
            <TabItem Header="Einstellungen" Name="Config" Loaded="Config_Loaded">
                <Grid>
                    <DataGrid AutoGenerateColumns="True" Name="dg_Template" ItemsSource="{Binding Path=.}" CanUserAddRows="True" CanUserDeleteRows="True" IsManipulationEnabled="True" SelectionUnit="Cell" RowEditEnding="dg_Template_RowEditEnding" CellEditEnding="dg_Template_CellEditEnding">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem>Test</MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>
                    </DataGrid>
                </Grid>
            </TabItem>
        </TabControl>

    </Grid>

</Window>
